package com.handle.system.web.controller;

import com.handle.system.api.entity.SysOperateLog;
import com.handle.system.api.service.ISysOperateLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangqing
 * @description 系统操作日志日志控制层
 * @date 2021/4/26 8:00 下午
 */
@RestController
@RequestMapping("/operateLog")
@AllArgsConstructor
@Api(tags = "系统操作日志", value = "SysOperateLogController")
public class SysOperateLogController {

    private final ISysOperateLogService sysOperateLogService;

    @ApiOperation("[Remote->Feign] 添加操作日志")
    @PostMapping(value = "/addOperateLog")
    public void addOperateLog(@RequestBody SysOperateLog sysOperateLog){
        sysOperateLogService.addLoginLog(sysOperateLog);
    }
}
